﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WD.Db.Contract;
using WD.Framework.Contract;

namespace WD.Db.BLL.LoginInfo
{
    public partial class Shop_LoginInfoService : IShop_LoginInfoService
    {
        #region 后台管理员登录信息处理

        //前后台用户类型区分
        private readonly AccountHandle _handle = new AccountHandle((int)账户凭证类型.商家);

        public Rbac_LoginInfo GetLoginInfo(Guid token)
        {
            return _handle.GetLoginInfo(token);
        }

        public Rbac_LoginInfo Login(string loginName, string password)
        {
            var loginInfo = _handle.Login(loginName, password);
            return loginInfo;
        }

        public void Logout(Guid token)
        {
            _handle.Logout(token);
        }

        public Guid SaveVerifyCode(string verifyCodeText)
        {
            return _handle.SaveVerifyCode(verifyCodeText);
        }

        public bool CheckVerifyCode(string verifyCodeText, Guid guid)
        {
            return _handle.CheckVerifyCode(verifyCodeText, guid);
        }
        #endregion
    }
}
